package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.FinanceMemberMapper;
import com.ruoyi.system.domain.FinanceMember;
import com.ruoyi.system.service.IFinanceMemberService;

/**
 * 会员订单管理Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-10-31
 */
@Service
public class FinanceMemberServiceImpl implements IFinanceMemberService 
{
    @Autowired
    private FinanceMemberMapper financeMemberMapper;

    /**
     * 查询会员订单管理
     * 
     * @param id 会员订单管理主键
     * @return 会员订单管理
     */
    @Override
    public FinanceMember selectFinanceMemberById(Long id)
    {
        return financeMemberMapper.selectFinanceMemberById(id);
    }

    /**
     * 查询会员订单管理列表
     * 
     * @param financeMember 会员订单管理
     * @return 会员订单管理
     */
    @Override
    public List<FinanceMember> selectFinanceMemberList(FinanceMember financeMember)
    {
        return financeMemberMapper.selectFinanceMemberList(financeMember);
    }

    /**
     * 新增会员订单管理
     * 
     * @param financeMember 会员订单管理
     * @return 结果
     */
    @Override
    public int insertFinanceMember(FinanceMember financeMember)
    {
        return financeMemberMapper.insertFinanceMember(financeMember);
    }

    /**
     * 修改会员订单管理
     * 
     * @param financeMember 会员订单管理
     * @return 结果
     */
    @Override
    public int updateFinanceMember(FinanceMember financeMember)
    {
        return financeMemberMapper.updateFinanceMember(financeMember);
    }

    /**
     * 批量删除会员订单管理
     * 
     * @param ids 需要删除的会员订单管理主键
     * @return 结果
     */
    @Override
    public int deleteFinanceMemberByIds(Long[] ids)
    {
        return financeMemberMapper.deleteFinanceMemberByIds(ids);
    }

    /**
     * 删除会员订单管理信息
     * 
     * @param id 会员订单管理主键
     * @return 结果
     */
    @Override
    public int deleteFinanceMemberById(Long id)
    {
        return financeMemberMapper.deleteFinanceMemberById(id);
    }

    @Override
    public void importFinanceMember(List<FinanceMember> financeMemberList) {
        for (FinanceMember financeMember : financeMemberList)
        {
            financeMemberMapper.insertFinanceMember(financeMember);
        }
    }
}
